<!DOCTYPE html>
<html>
<head>
	<title>Attached to layout cell</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myLayout, myGrid, myToolbar;
		var loadData = {};
		function doOnLoad() {
			myLayout = new dhtmlXLayoutObject("parentId", "2U");
			myLayout.cells("a").hideHeader();
			myLayout.cells("a").setWidth(350);
			
			myToolbar = myLayout.cells("a").attachToolbar();
			myToolbar.attachEvent("onXLE", function(){
				loadData.toolbar = true;
			});
			
			myGrid = myLayout.cells("a").attachGrid();
			myGrid.setImagePath("../../../codebase/imgs/")
			myGrid.load("../common/grid.xml");
			
			loadToolbar(18);
			
		}
		function loadToolbar(a) {
			if (!checkLoadState()) return;
			loadData.toolbar = false;
			myToolbar.clearAll();
			myToolbar.setIconSize(a);
			myToolbar.setIconsPath("../common/icon_size/material/"+a+"/");
			myToolbar.loadStruct("../common/dhxtoolbar_button2.xml");
		}
		function checkLoadState() {
			var s = true;
			for (var a in loadData) s = s&&loadData[a];
			return s;
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div style="padding-bottom: 10px;">
		<input type="button" value="18" onclick="loadToolbar(18);">
		<input type="button" value="24" onclick="loadToolbar(24);">
		<input type="button" value="32" onclick="loadToolbar(32);">
		<input type="button" value="48" onclick="loadToolbar(48);">
	</div>
	<div id="parentId" style="position: relative; width: 600px; height: 400px;"></div>
</table>
</body>
</html>